package com.hnnou.freshmenappserver.service.impl;

import com.hnnou.freshmenappserver.bean.News;
import com.hnnou.freshmenappserver.bean.User;
import com.hnnou.freshmenappserver.dao.NewsDao;
import com.hnnou.freshmenappserver.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    NewsDao newsDao;

    public List<News> findAll() {
        return newsDao.findAll();
    }

    @Override
    public News selectById(Integer id) {

        return  newsDao.selectById(id);
    }

    @Override
    public int deleteById(Integer id) {
        return newsDao.deleteById(id);
    }

    @Override
    public int update(News news) {
        return newsDao.update(news);
    }

    @Override
    public int insert(News news) {
        return newsDao.insert(news);
    }
}
